Signal processing apparatus, signal processing method, and program

ABSTRACT

The present technology relates to a signal processing apparatus, a signal processing method, and a program by which, in reproducing transmitted encoded data in real time, buffer overflow can be prevented from occurring on a reception apparatus side even if it is transmitted with a compression rate of the encoded data being varied in a manner that depends on communication condition. Encoded data including transmitted audio data is buffered by a reception buffer. At this time, the quantity of encoded data buffered by the reception buffer is managed in units of processing according to an encoding method. The present technology is applicable to a real-time content reproduction system utilizing a communication system.

CROSS REFERENCE TO RELATED APPLICATIONS

This Application is a Continuation of U.S. application Ser. No.15/536,284, filed Jun. 15, 2017, entitled “SIGNAL PROCESSING APPARATUS,SIGNAL PROCESSING METHOD, AND PROGRAM”, which is a national stage filingunder 35 U.S.C. 371 of International Patent Application Serial No.PCT/JP2015/084762, filed Dec. 11, 2015, entitled “SIGNAL PROCESSINGAPPARATUS, SIGNAL PROCESSING METHOD, AND PROGRAM”. Foreign prioritybenefits are claimed under 35 U.S.C. § 119(a)-(d) or 35 U.S.C. § 365(b)of Japanese application number 2014-264253, filed Dec. 26, 2014. Theentire contents of these applications are incorporated herein byreference in their entirety.

TECHNICAL FIELD

The present technology relates to a signal processing apparatus, asignal processing method, and a program, and more particularly to asignal processing apparatus, a signal processing method, and a program,by which, in reproducing encoded data wirelessly transmitted with acompression rate being varied in a manner that depends on communicationcondition, a reproduction delay time can be made constant irrespectiveof the compression rate at the start of reproduction.

BACKGROUND ART

There is a reproduction system, which is called Bluetooth Advanced AudioDistribution Profile (hereinafter, also referred to as Bluetooth A2DP),in which wireless transmission and reproduction are performed at thesame time in real time. This reproduction system employs a technology ofpreventing sound interruption by accumulating a certain quantity ofencoded audio data (hereinafter, also simply referred to as encodeddata) in a buffer on a receiver side (hereinafter, also simply referredto as reception buffer) before it is reproduced on the receiver side(see Patent Literature 1).

Determination of reproduction start in the technology of PatentLiterature 1 above is based on the quantity of accumulated data (numberof bytes, number of words, etc.). For example, if encoded dataequivalent to 60% of the buffer size in the reception buffer is received(accumulated), it is determined that reproduction should be started. Inaddition, there has also been proposed to estimate transmissioncondition and vary the compression rate.

However, in such a system, a time until reproduction is started, thatis, a delay time can be varied if the compression rate in encodingprocessing is varied. In addition, the buffer size of the receptionbuffer on the reception side can be exceeded if the compression rate isvaried during reproduction.

In view of this, in order to avoid data overflow of the receptionbuffer, there has been proposed a technology of adaptively changingtransmission/reception (see Patent Literature 2). That is, in the methodof Patent Literature 2, the overflow of the reception buffer is avoidedin such a manner that, if the reception buffer buffers datacorresponding to a defined number of bytes or more, an apparatus on thereception side transmits a status to a transmission side and a data flowto be transmitted is controlled and changed on the transmission side.

CITATION LIST Patent Literature

Patent Literature 1: Japanese Patent Application Laid-open No.2003-309541

Patent Literature 2: Japanese Patent Application Laid-open No.2014-131301

DISCLOSURE OF INVENTION Technical Problem

However, in the case of using the technology of Patent Literature 2,there is a possibility that some data cannot be transmitted on thetransmission side. Further, it is assumed that such data is accumulatedin the buffer on the transmission side at this time. Therefore, if thetransmission environment is deteriorated and the transmission isdelayed, there is a possibility that the buffer on the transmission sidemay experience overflow more early as compared to the case where theaccumulation is not performed. In addition, it cannot vary thereproduction start time in a manner that depends on the compressionrate.

It is necessary to consume or discard encoded data on the reception sidemore rapidly than normal in order to keep the delay time constant aftersound interruption that may occur in the case wheretransmission/reception is delayed, for example.

A factor that varies the delay time is that a certain quantity ofuntransmitted data is accumulated on the transmission side, for example,if the transmission environment is deteriorated in wirelesstransmission.

The accumulated untransmitted data is encoded data that should beoriginally accumulated in the reception buffer and reproduced. Thus, itis desirable that the accumulated untransmitted data be earlytransmitted and received. Therefore, after the transmission environmentrecovers, the accumulated untransmitted data is continuously transmittedat transmission intervals shorter than normal. However, if a measure,for example, making the reproduction speed higher than normal on thereception side is not carried out, the delay time varies due to theinfluence of, for example, a difference between a buffer capacity on thetransmission side and a buffer capacity on the reception side.

However, there is no guarantee that the compression rate at the start ofreproduction is equal to the compression rate in processing after thesound interruption. In the case of management based on the quantity ofdata, there has been a fear that the delay time cannot be compensatedfor by using the encoded data.

Further, it is also conceivable that restoration is performed inaccordance with a reproduction method of performing reproduction whileperforming fast forwarding or decimation. However, intervals ofreproduction sound in the restoration are changed due to performingreproduction while performing fast forwarding or decimation. Thus, therehas been a fear that it may give discomfort to a listener.

The present technology has been made in the above-mentionedcircumstances, particularly to enable, in reproducing transmittedencoded data in real time, the transmitted encoded data to be reproducedon a reception side without being influenced by a delay time even if theencoded data is transmitted with a compression rate of the encoded databeing varied in a manner that depends on communication condition.

Solution to Problem

A signal processing apparatus according to an aspect of the presenttechnology includes: a receiver that receives encoded data encoded inaccordance with a predetermined encoding method, which is transmitted; astorage unit that stores the encoded data received by the receiver; adecoder that decodes the encoded data stored in the storage unit, inaccordance with a method corresponding to the predetermined encodingmethod; and a decoding management unit that controls decoding by thedecoder to be permitted on the basis of the number of units of decodingprocessing in the encoded data, which are stored in the storage unit, inthe predetermined encoding method when decoded by the decoder.

The decoding management unit may control decoding by the decoder to bepermitted when the number of units of decoding processing in the encodeddata, which are stored in the storage unit, is larger than apredetermined threshold.

The signal processing apparatus can further include a switching unitthat switches an output of the storage unit to the decoder or others,and the decoding management unit can control, when the number of unitsof decoding processing in the encoded data, which are stored in thestorage unit, is larger than a predetermined threshold, the switchingunit to connect the output of the storage unit to the decoder to therebycontrol decoding by the decoder to be permitted.

The signal processing apparatus can further include a restorationmeasure unit that determines, on the basis of the number of units ofdecoding processing in the encoded data, which are stored in the storageunit, whether or not to turn on a restoration measure mode on which arestoration measure processing is performed, and performs therestoration measure processing, the restoration measure processing beinga measure for preventing a state in which all the encoded data cannot bedecoded by the decoder in the case where a transmission state of theencoded data is delayed due to deterioration of a transmissionenvironment and then the transmission environment is restored and theencoded data are collectively transmitted.

The restoration measure unit can turn on the restoration measure modewhen the number of units of decoding processing in the encoded data,which are stored in the storage unit, is 0. The signal processingapparatus can further include a discard management unit that discards,in units of decoding processing, part of the encoded data stored in thestorage unit when the restoration measure mode is on and the number ofunits of decoding processing in the encoded data, which are stored inthe storage unit, is larger than a reference value based on thepredetermined threshold.

The discard management unit can discard, in units of decodingprocessing, the encoded data stored in the storage unit, which exceedsthe reference value based on the predetermined threshold in terms of thenumber of units of decoding processing.

The discard management unit can discard, in units of decodingprocessing, the encoded data stored in the storage unit, whichcorresponds to a quantity set correspondingly to an increment in thenumber of units of decoding processing per unit time.

The signal processing apparatus can further include: a switching unitthat switches an output of the storage unit to the decoder or others;and a discard unit that discards, in units of decoding processing, partof the encoded data stored in the storage unit. The discard managementunit can control, when discarding, in units of decoding processing, thepart of the encoded data stored in the storage unit, the switching unitto connect the output of the storage unit to the discard unit to therebydiscard, in units of decoding processing, the part of the encoded datastored in the storage unit.

The restoration measure unit can calculate a state variable atpredetermined time intervals on the basis of a mean and a variance ofthe number of units of decoding processing in the encoded data, whichare stored in the storage unit, in a predetermined period, and turn offthe restoration measure mode when a state in which a difference absolutevalue from a predetermined reference value is smaller than apredetermined threshold continues.

The signal processing apparatus can further include a sequence thatstores a comparison result obtained by the restoration measure unitcomparing a difference absolute value between the state variable, whichis calculated at the predetermined time intervals, and a predeterminedreference value with a predetermined threshold. The restoration measureunit can turn off the restoration measure mode when a state in which thestate variable calculated at the predetermined time intervals on thebasis of the comparison result stored in the sequence, the differenceabsolute value from the predetermined reference value is smaller thanthe predetermined threshold continues.

The encoded data can be obtained by encoding audio data to be output asaudio through a speaker. The signal processing apparatus can furtherinclude a mute controller that controls an output level of audio fromthe speaker, which is based on the audio data decoded by the decoder.When the restoration measure mode is on, the mute controller can controlthe output level of the audio from the speaker, which is based on theaudio data decoded by the decoder, to be lowered.

A signal processing method according to an aspect of the presenttechnology includes the steps of: receiving encoded data encoded inaccordance with a predetermined encoding method, which is transmitted;storing the received encoded data; decoding the stored encoded data inaccordance with a method corresponding to the predetermined encodingmethod; and controlling decoding to be permitted on the basis of thenumber of units of decoding processing in the stored encoded data in thepredetermined encoding method when decoded.

A program according to an aspect of the present technology causes acomputer to function as: a receiver that receives encoded data encodedin accordance with a predetermined encoding method, which istransmitted; a storage unit that stores the encoded data received by thereceiver; a decoder that decodes the encoded data stored in the storageunit, in accordance with a method corresponding to the predeterminedencoding method; and a decoding management unit that controls decodingby the decoder to be permitted on the basis of the number of units ofdecoding processing in the encoded data, which are stored in the storageunit, in the predetermined encoding method when decoded by the decoder.

In an aspect of the present technology, encoded data encoded inaccordance with a predetermined encoding method, which is transmitted,is received. The received encoded data is stored. The stored encodeddata is decoded in accordance with a method corresponding to thepredetermined encoding method. Decoding is controlled to be permitted onthe basis of the number of units of decoding processing in the encodeddata in the predetermined encoding method when decoded.

The signal processing apparatus according to an aspect of the presenttechnology may be an independent apparatus or may be a block thatrealizes signal processing.

Advantageous Effects of Invention

In accordance with an aspect of the present technology, it becomespossible to reproduce, when reproducing transmitted encoded data in realtime, the transmitted encoded data on a reception side without beinginfluenced by a delay time even if the encoded data is transmitted witha compression rate of the encoded data being varied in a manner thatdepends on communication condition.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 A diagram describing a configuration example of a firstembodiment of an audio reproduction system to which the presenttechnology is applied.

FIG. 2 A flowchart describing reproduction processing in the audioreproduction system of FIG. 1.

FIG. 3 A flowchart describing restoration measure processing in theaudio reproduction system of FIG. 1.

FIG. 4 A diagram describing a change over time in the number of recordedframes in the restoration measure processing in the audio reproductionsystem of FIG. 1.

FIG. 5 A diagram describing a configuration example of a secondembodiment of the audio reproduction system to which the presenttechnology is applied.

FIG. 6 A flowchart describing restoration measure processing in theaudio reproduction system of FIG. 5.

FIG. 7 A diagram describing a change over time in the number of recordedframes in the restoration measure processing in the audio reproductionsystem of FIG. 5.

FIG. 8 A diagram describing a configuration example of a general-purposepersonal computer.

MODE(S) FOR CARRYING OUT THE INVENTION

<Configuration Example of First Embodiment of Audio Reproduction System>

FIG. 1 shows a configuration example of an audio reproduction system towhich the present technology is applied.

The audio reproduction system of FIG. 1 is constituted of a Bluetoothmodule 11, a receiver/reproducer 12, a speaker 13, and a transmitter 21.In the audio reproduction system of FIG. 1, the transmitter 21 transmitsencoded data including audio data encoded in accordance with BluetoothAdvanced Audio Distribution Profile (hereinafter, also referred to asBluetooth A2DP), the receiver/reproducer 12 receives it via theBluetooth module 11, decodes it, and outputs it as audio through thespeaker 13. At this time, the receiver/reproducer 12 manages bufferingof the encoded data on a frame-by-frame basis, the frame being a minimumunit of processing of an audio encoding method in the Bluetooth A2DP. Inthis manner, even if the encoded data is transmitted with a compressionrate being varied in a manner that depends on communication condition,the encoded data can be reproduced without being influenced by a delaytime.

The Bluetooth module 11 receives packets of the Bluetooth A2DP that aretransmitted from the transmitter 21, processes respective layers of alink manger, a base band, and an RF (Radio Frequency) in accordance withL2CAP (Logical Link Control and Adaptation Protocol) protocol, andoutputs base-band packets to a reception processor 31 of thereceiver/reproducer 12 via an HCl (Host Controller Interface).

The receiver/reproducer 12 is, for example, so-called Host CPU (HostCentral Processing Units), and includes the reception processor 31, acodec unit 32, a reception buffer 33, a reproduction controller 34, aswitch 35, a decoder 36, a data discarding unit 37, and a mutecontroller 38.

Note that, although a configuration example in which the Bluetoothmodule 11 and the receiver/reproducer 12 are individually provided isshown in the example of FIG. 1, they may be integrally configured.

Further, in this embodiment, for the sake of simplifying thedescription, an example of recording the number of frames transmitted ina single packet at the head of a media payload of the A2DP on thetransmission side will be described. However, instead of recording thenumber of frames on the transmission side, the number of frames may becalculated by parsing the media payload on the reception side, forexample.

The reception processor 31 receives received data from the Bluetoothmodule 11 via the HCl, processes the received data in accordance withthe L2CAP and AVDTP (AV Distribution Transport Protocol) and restoresthe media payload, and outputs the media payload to the codec unit 32.

The codec unit 32 includes a number-of-frames calculator 32 a. The codecunit 32 causes the number-of-frames calculator 32 a to calculateinformation on the number of frames of the encoded data recorded in themedia payload that is supplied from the reception processor 31 torestore the information, and supplies the information to thereproduction controller 34 as information on the number of receivedframes. Further, the codec unit 32 restores the encoded data, which isrecorded in the media payload, and causes the reception buffer 33 tostore the encoded data.

Note that the term “frame” set forth herein refers to a unit ofprocessing of encoding conversion that is defined in accordance with anaudio encoding method, for example, AAC (Advanced Audio Coding) or ATRAC(Adaptive TRansform Acoustic Coding). Further, hereinafter, thedescription will be made assuming that processing is performed on aframe-by-frame basis. However, the unit of processing may be one otherthan the frame in a manner that depends on an encoding method. Also, theencoding method may be an encoding method other than those mentionedabove.

The reproduction controller 34 subtracts the number of used framessupplied from the decoder 36 and the number of discarded frames suppliedfrom the data discarding unit 37 from the number of received framessupplied from the codec unit 32 to thereby update the number of recordedframes. The number of recorded frames expresses the encoded data storedin the reception buffer 33 as the number of frames. Further, the term“the number of used frames” set forth herein is the number of frames ofstored frames stored in the reception buffer 33, which are read andreproduced by the decoder 36. Here, the term “the number of discardedframes” is the number of frames corresponding to encoded data of theencoded data stored in the reception buffer 33, which is discarded bythe data discarding unit 36.

In addition, if the reproduction controller 34 has not yet startedreproduction, the reproduction controller 34 determines whether or notthe number of recorded frames has reached a predetermined threshold. Ifthe number of recorded frames has reached the predetermined threshold,the reproduction controller 34 turns on a reproduction-permitted modeand controls the switch 35 to supply the encoded data stored in thereception buffer 33 to the decoder 36 and start reproduction. Thispredetermined threshold may be set in advance during design or may beadjusted by a user. The reproduction controller 34 controls the mutecontroller 38 to mute audio output to be output to the speaker 13 by thedecoder 36.

Further, the reproduction controller 34 includes a reproductionmanagement unit 34 a, a restoration measure unit 34 b, a determinationsequence 34 c, and a discard management unit 34 d. The reproductionmanagement unit 34 a calculates the number of recorded frames describedabove. The reproduction management unit 34 a compares the number ofrecorded frames with the predetermined threshold. If it is larger thanthe predetermined threshold, the reproduction management unit 34 a turnson a flag of the reproduction-permitted mode and connects the switch 35to a terminal 35 a to sequentially supply encoded data stored in thereception buffer 33 to the decoder 36. Thus, audio reproduction ispermitted.

The restoration measure unit 34 b turns on a flag of a restorationmeasure mode on the basis of whether or not the number of recordedframes is 0. The fact that the number of recorded frames is 0 can beconsidered to mean that data transmitted from the transmitter 21 cannotbe received due to deterioration of the transmission state and theencoded data stored in the reception buffer 33 is not present. In such acase, if the transmission state recovers, encoded data which have notbeen transmitted are transmitted. Thus, the reproducible state isrestored.

However, when the state in which audio can be reproduced is thusrestored, many encoded data which have not been transmitted aretransmitted at once. Therefore, there is a fear that buffer overflow mayoccur in the reception buffer 33. In view of this, the restorationmeasure unit 34 b turns on the flag of the restoration measure mode,performs restoration measure processing thereof in cooperation with thediscard management unit 34 d, and suppresses the occurrence of thebuffer overflow by, for example, discarding encoded data of thereception buffer 33. Further, when performing the restoration measureprocessing, the restoration measure unit 34 b determines a statevariable that represents an indicator of change in the number ofrecorded frames in a state in which a frame to be discarded is notpresent, and causes the determination sequence 34 c including FIFO tosequentially store a comparison result of the state variable with thepredetermined threshold. Then, the restoration measure unit 34 bdetermines whether or not to terminate the restoration measure mode onthe basis of the comparison result stored in the determination sequence34 c.

When the flag of the restoration measure mode is turned on, the discardmanagement unit 34 d calculates the number of frames to be discarded outof the encoded data stored in the reception buffer 33, on the basis ofthe number of recorded frames. Then, the discard management unit 34 dcontrols the switch 35 to be connected to a terminal 35 b to supplyencoded data of the encoded data stored in the reception buffer 33,which correspond to the calculated number of frames to be discarded, tothe data discarding unit 37. Then, the supplied encoded data isdiscarded by the data discarding unit 37.

The switch 35 is controlled by the reproduction controller 34 to beconnected to the terminal 35 a such that the output of the receptionbuffer 33 is output to the decoder 36, to be connected to the terminal35 b such that the output of the reception buffer 33 is output to thedata discarding unit 37, or not to be connected to either of theterminals 35 a and 35 b such that the output of the reception buffer 33is not output to either of them.

When the switch 35 is controlled by the reproduction controller 34 suchthat the encoded data can be supplied from the reception buffer 33, thedecoder 36 retrieves the encoded data from the reception buffer 33 atregular time intervals in accordance with decoding settings, performsdecoding processing thereon, and outputs the decoded data to the speaker13 via the mute controller 38 for outputting the decoded data as audio.For example, the reception buffer 33 is configured in an FIFO (Fast InFast Out) format. The decoder 36 sequentially retrieves encoded data inorder of oldest to newest and reproduces them as audio and outputs theaudio through the speaker 13.

Further, when the switch 35 is controlled by the reproduction controller34 such that the encoded data can be supplied from the reception buffer33, the data discarding unit 37 reads and discards encoded data from thereception buffer 33.

<Reproduction Processing by Receiver/Reproducer of FIG. 1>

Next, reproduction processing by the audio reproduction system of FIG. 1will be described. Note that processing in which encoded data forreproducing audio through processing of L2CAP and AVDTP are sequentiallytransmitted from the transmitter 21 and received and reproduced as audioby the receiver/reproducer 12 will be described here.

In Step S11, the Bluetooth module 11 determines whether or not packetsof the Bluetooth A2DP including audio data have been transmitted andreceived from the transmitter 21. Then, for example, if the packets ofthe Bluetooth A2DP including audio data have been transmitted andreceived from the transmitter 21 through wireless communication, theprocessing proceeds to Step S12.

In Step S12, the Bluetooth module 11 receives packets of the BluetoothA2DP, processes layers of a link manger, a base band, and a RF (RadioFrequency) in accordance with L2CAP (Logical Link Control and AdaptationProtocol) protocol, and outputs base-band packets to the receptionprocessor 31 of the receiver/reproducer 12 via an HCl (Host ControllerInterface). The reception processor 31 restores media payload data fromthe received base-band packets and supplies the media payload data tothe codec unit 32.

In Step S13, the codec unit 32 controls the number-of-frames calculator32 a to calculate the number of frames of the audio encoding method,which are units of processing of an audio signal, as the number ofreceived frames on the basis of the received media payload data, andsupplies it to the reproduction controller 34. Further, the codec unit32 decodes and restores the encoded data from the media payload data andsupplies the decoded and restored data to the reception buffer 33 forstoring the decoded and restored data.

In Step S14, the reproduction controller 34 controls the reproductionmanagement unit 34 a to subtract the sum of the number of used framesread and reproduced from the reception buffer 33 by the decoder 36 andthe number of discarded frames read and discarded from the receptionbuffer 33 by the data discarding unit 37 from the preceding number ofrecorded frames. In addition, the reproduction controller 34 controlsthe reproduction management unit 34 a to add the number of receivedframes to the result of subtraction to thereby determine the currentnumber of recorded frames recorded in the reception buffer 33. Thus, itis expressed as follows: the current number of recorded frames=thepreceding number of recorded frames−(the number of discarded frames+thenumber of used frames)+the number of received frames. Thereafter, thereproduction management unit 34 a repeats such processing to therebysequentially update the current number of recorded frames. Note that, infirst processing, the preceding number of recorded frames, the number ofused frames, and the number of discarded frames are all 0, and hence thenumber of received frames is the number of recorded frames.

In Step S15, the reproduction controller 34 controls the restorationmeasure unit 34 b to execute the restoration measure processing. Therestoration measure processing is for the case where the encoded datacannot be received due to deterioration of the transmission environmentand sound interruption occurs, the transmission environment is restored,and the encoded data can be received and audio can be output again. Notethat the restoration measure processing will be described later indetail with reference to the flowchart of FIG. 3.

In Step S16, the reproduction controller 34 controls the reproductionmanagement unit 34 a to determine whether or not it is necessary todetermine anew whether or not the flag of the reproduction-permittedmode is not on and whether or not the flag of the reproduction-permittedmode is on. In Step S16, if the flag of the reproduction-permitted modeis not on and it is necessary to determine anew whether or not to turnon the reproduction-permitted mode, the reproduction management unit 34a considers that it is necessary to determine whether or not it is thereproduction-permitted mode and the processing proceeds to Step S17.

In Step S17, the reproduction management unit 34 a determines whether ornot to turn on the reproduction-permitted mode, on the basis of whetheror not the number of recorded frames currently recorded in the receptionbuffer 33 is larger than a predetermined threshold. In Step S17, forexample, if the number of recorded frames is larger than thepredetermined threshold, the reproduction management unit 34 a turns onthe flag of the reproduction-permitted mode in Step S18. Note that, forexample, if the number of recorded frames is smaller than thepredetermined threshold in Step S17, the reproduction management unit 34a turns off the flag of the reproduction-permitted mode in Step S19.

In Step S20, the reproduction management unit 34 a determines whether ornot the reproduction-permitted mode is on, and, if thereproduction-permitted mode is on, the processing proceeds to Step S21.

In Step S21, the reproduction management unit 34 a controls the switch35 such that the encoded data can be supplied to the decoder 36 from thereception buffer 33, and supplies the encoded data to the decoder 36.The decoder 36 reads and decodes the encoded data, generates audio data,and causes the speaker 13 to output and reproduce audio via the mutecontroller 38.

Note that, in the first processing, audio is output through the speaker13 because the mute controller 38 is set to be in a mute-off state bydefault. Thereafter, when the mute controller 38 is in a mute-on state,an audio signal is output to the speaker 13 from the decoder 36 butaudio is not output through the speaker 13.

In Step S22, the reception processor 31 determines whether or nottermination of the processing is instructed, and terminates theprocessing if the termination is instructed. Further, in Step S22, ifthe termination of the processing is not instructed, the processingproceeds to Step S23.

In Step S23, the reception processor 31 determines whether or not apredetermined time has elapsed, and repeats similar processing until thepredetermined time has elapsed. If the predetermined time has elapsed,the processing returns to Step S11. That is, the series of processing ofSteps S11 to S23 is repeatedly executed at predetermined time intervalsuntil a termination instruction is given.

Further, in Step S11, if packets are not received, the processing ofSteps S12 to S14 are skipped. In addition, in Step S16, if it is notnecessary to determine whether or not the reproduction-permitted mode ison, the processing of Steps S17 to S19 is skipped.

Further, in Step S20, if the reproduction-permitted mode is not on, theprocessing of Step S21 is skipped and the reproduction processing is notperformed.

In the above-mentioned processing, the encoded data accumulated in thereception buffer 33 is sequentially read, and whether or not to turn onthe flag of the reproduction-permitted mode for permitting decoding andreproduction is determined on a frame-by-frame basis, which are units ofprocessing of the encoding method, for example, the number of recordedframes. With this, management can be performed in units of processingthat are the number of frames even in the case where the encoding methodis changed or the compression rate is varied during communication. Thus,it becomes possible to compensate for the delay time within a certainrange and it becomes possible to suppress the occurrence of the bufferoverflow of the reception buffer 33.

<Restoration Measure Processing by Receiver/Reproducer of FIG. 1>

Next, the restoration measure processing will be described withreference to the flowchart of FIG. 3. This restoration measureprocessing is measure processing for avoiding a situation where overflowof the reception buffer 33 occurs and a delay time cannot be compensatedfor. This situation occurs in the case where the transmissionenvironment is deteriorated during reproduction of audio signals, thetransmission is delayed, and sound interruption occurs, and then thetransmission environment is improved and the thus delayed encoded dataare transmitted at once.

In Step S41, the reproduction controller 34 controls the restorationmeasure unit 34 b to determine whether or not the restoration measuremode is on. More specifically, the restoration measure unit 34 bdetermines whether or not the flag of the restoration measure mode isturned on. In Step S41, for example, if the flag of the restorationmeasure mode is not turned on, the processing proceeds to Step S52.

In Step S52, the restoration measure unit 34 b inquires the reproductionmanagement unit 34 a and determines whether or not the flag of thereproduction-permitted mode is turned on. In Step S52, if it isdetermined that the reproduction-permitted mode is on, the processingproceeds to Step S53.

In Step S53, the restoration measure unit 34 b determines whether or notthe number of recorded frames is 0. That is, whether or not accumulatedencoded data have been all reproduced, exhausted in the case wheretransmitted encoded data cannot be received due to deterioration of thetransmission environment is determined. In Step S53, if it is determinedthat the number of recorded frames is 0, the processing proceeds to StepS54. That is, in this case, a state in which encoded data cannot besufficiently received due to the deterioration of the transmissionenvironment continues and reproduction is impossible.

In Step S54, the restoration measure unit 34 b turns on the flag of therestoration measure mode to enter the restoration measure mode, andperforms initialization processing on the restoration measure mode.Here, the initialization processing is, for example, processing ofinitializing the state variable, which will be described later, andvalues of the determination sequence 34 c for determining termination ofthe restoration measure mode.

In Step S55, the restoration measure unit 34 b controls the mutecontroller 38 to prevent the output of audio from the speaker 13 inaccordance with the audio data output from the decoder 36 thereafter.That is, thereafter, encoded data will be intensively transmittedcorrespondingly to the delay of the transmission due to thedeterioration of the transmission environment. Therefore, in order toavoid the overflow of the reception buffer 33, processing in which partof the encoded data is discarded by processing to be described later isperformed, for example. Thus, there is a fear that reproduced audio mayhave noise mixed or may be output as abnormal sound. Therefore, in orderto prevent the audio output during this time, the mute controller 38 isbrought into the mute-on state.

In Step S56, the number of recorded frames of the reception buffer 33 is0, and hence the reproduction controller 34 turns off the flag of thereproduction-permitted mode to terminate the reproduction-permitted modeand terminates the restoration measure processing.

Further, after that, when the restoration measure processing isre-started after the series of processing of the flowchart in FIG. 2,the flag of the restoration measure mode has been turned on. Therefore,in Step S41, it is determined that the restoration measure mode is onand the processing proceeds to Step S42.

In Step S42, the reproduction controller 34 controls the discardmanagement unit 34 d to calculate the number of frames to be discarded.More specifically, when setting the flag of the reproduction-permittedmode, for example, the discard management unit 34 d sets a discardthreshold as a reference value obtained by adding a certain margin tothe predetermined threshold to be compared to the number of recordedframes. The discard management unit 34 d calculates the number of framesof the number of recorded frames, which exceeds this discard threshold,as the number of frames to be discarded. Alternatively, when thereference number of frames is exceeded, for example, the discardmanagement unit 34 d may calculate a predetermined number of frames,which are set during design, as the number of frames to be discarded.

In Step S43, the restoration measure unit 34 b calculates and updatesthe state variable. Here, the state variable is, for example, anumerical value representing an indicator indicating whether or not amean and a variance of the number of recorded frames within apredetermined observation time determined during design are values of apredetermined range. For example, a numerical value representing anindicator indicating whether or not a mean of the number of recordedframes within a predetermined observation time determined during designfalls within ±10% of a predetermined threshold for determining the flagof the reproduction-permitted mode or a numerical value representing anindicator indicating whether or not a variance falls within a referencerange defined during design is used as the state variable.

Here, the restoration measure unit 34 b compares respective referencesin percentage terms, for example, and uses a value obtained bymultiplying comparison results thereof as the state variable. Morespecifically, for example, provided that the mean of the number ofrecorded frames within the predetermined observation time is 90% of thethreshold for determining the flag of the reproduction-permitted modeand the variance of the number of recorded frames within thepredetermined observation time is 80% of the reference value, thereproduction controller 34 multiplies both to determine 72%(=90%×80%=0.72). In this manner, the state variable is a value that iscloser to 100% (=1.0) as the mean becomes closer to the predeterminedthreshold for determining the flag of the reproduction-permitted modeand the variance becomes closer to the reference value, that is, as theybecome closer to the set values.

Alternatively, the state variable may be, for example, a ratio of anamount of change in the number of recorded frames per predetermined timeto an amount of change in the number of used frames per predeterminedtime. That is, in this case, if the amount of change in the number ofrecorded frames per predetermined time and the amount of change in thenumber of used frames per predetermined time are suitably set, changesin both become almost identical values and the ratio of the both that isthe state variable is also a value near 1 (=100%).

In Step S44, the discard management unit 34 d determines whether or nota frame to be discarded is present, on the basis of the calculationresult of the number of frames to be discarded. For example, if thenumber of frames to be discarded is present, the processing proceeds toStep S45.

In Step S45, the discard management unit 34 d discards encoded data ofthe encoded data stored in the reception buffer 33, which correspond tothe number of frames to be discarded, and the processing ends. Morespecifically, the discard management unit 34 d controls the switch 35 tobe connected to the terminal 35 b to thereby supply the encoded data tothe data discarding unit 37. The data discarding unit 37 discards thesupplied encoded data.

Note that, when discarding the encoded data, for example, whendiscarding encoded data, which correspond to a plurality of frames, theymay be discarded by performing decimation at regular frame intervals. Bydoing so, continuity and consistency of left encoded data on aframe-by-frame basis can be maintained.

That is, in the case where transmission of encoded data is delayed dueto the deterioration of the transmission state, the restoration measuremode is started, the encoded data are transmitted at once, and a statein which too much encoded data to be processed is accumulated in thereception buffer 33 continues, the processing of Steps S41 to S45 aboveis repeated and the encoded data is continuously discarded.

On the other hand, in Step S44, if it is determined that the frame to bediscarded is not present, that is, if it is determined that the encodeddata of the frame to be discarded is not recorded in the receptionbuffer 33, the processing proceeds to Step S46.

In Step S46, the restoration measure unit 34 b determines whether or nota difference absolute value between the state variable and 1 is smallerthan a predetermined threshold, that is, whether or not the transmissionstate is stable and the number of recorded frames is in a state closerto a set operation state. In Step S46, for example, if it is determinedthat the difference absolute value between the state variable and 1 issmaller than the predetermined threshold, if the transmission state isstable and it is in the state closer to the set operation state, theprocessing proceeds to Step S47.

In Step S47, the restoration measure unit 34 b overwrites an oldestvalue of the determination sequence 34 c for determining the terminationof the restoration measure mode, with a value of 1 indicating that thetransmission state is stable and it is in the state closer to the setoperation state, and stores the value of 1.

Further, in Step S46, if it is determined that the difference absolutevalue between the state variable and 1 is not smaller than thepredetermined threshold, the transmission state is instable and it isnot in the state closer to the set operation state, the restorationmeasure unit 34 b overwrites, in Step S48, the oldest value of thedetermination sequence 34 c, with a value of 0 indicating that thetransmission state is instable and it is not in the state closer to theset operation state, and stores the value of 0.

In Step S49, the restoration measure unit 34 b reads information of thedetermination sequence 34 c and determines whether or not to terminatethe restoration measure mode on the basis of, for example, whether ornot all the stored values are 1, that is, whether or not a state inwhich the difference absolute value between the state variable and 1stored in the determination sequence 34 c is smaller than thepredetermined threshold continues a predetermined number of times. InStep S49, for example, if all the values stored in the determinationsequence 34 c are 1, the restoration measure unit 34 b determines toterminate the restoration measure mode and the processing proceeds toStep S50.

In Step S50, the restoration measure unit 34 b turns off the flag of therestoration measure mode to terminate the restoration measure mode.

In Step S51, the reproduction controller 34 controls the mute controller38 not to mute the audio data output from the decoder 36 such that theaudio data can be supplied to the speaker 13 and output as audio.

In addition, in Step S49, if all the values stored in the determinationsequence 34 c are not 1, it is necessary to continue the restorationmeasure mode, and hence the processing of Steps S50 and S51 is skipped.Then, the restoration measure processing is terminated.

In the above-mentioned processing, if the transmission state becomesunstable and the state in which the encoded data is not stored in thereception buffer 33 continues, the flag of the reproduction-permittedmode is turned off and the flag of the restoration measure mode isturned on. As the restoration measure processing, encoded dataexcessively transmitted when the transmission state is restored isdiscarded on a frame-by-frame basis. Thus, even if encoded data atvarious compression rates are transmitted when the transmission staterecovers such that reproduction can be performed again, the encoded datais discarded on the basis of the number of frames that is the unit ofprocessing, and hence compensation for the delay time using the encodeddata can be realized.

Further, mute is turned on by the mute controller 38 on the restorationmeasure mode. Thus, audio like noise is not output. The audio like noiseis generated by decoding and reproducing discarded encoded data in amanner that depends on needs after the transmission state recovers suchthat the encoded data can be stored in the reception buffer 33 and theflag of the reproduction-permitted mode is turned on. Thus, generationof the audio output like noise can be suppressed, and hence it becomespossible to prevent discomfort from being given to a listener.

Further, an operation state of the reception buffer 33 is managed on thebasis of the number of recorded frames recorded in the reception buffer33. Therefore, designing for suitably preventing the occurrence of thebuffer overflow is facilitated.

In addition, the restoration measure processing is performed asprocessing that is part of the reproduction processing. Thus, it can beconcurrently executed even in a state in which the transmission state isimproved, the flag of the reproduction-permitted mode is turned on, theencoded data is sequentially decoded, and audio is output. Therefore,the encoded data can also be discarded while audio is reproduced. Insuch a case, instead of completely stopping the audio output from thespeaker 13 by the mute controller 38, it may be output with a soundvolume smaller than normal. By doing so, main audio can be output, andhence it becomes possible for a listener to listen to the audio output.In addition, even in the case of audio having a little noise, the soundvolume is reduced, and hence it becomes possible to reduce thediscomfort.

<Configuration Example of Second Embodiment of Audio ReproductionSystem>

In accordance with the above-mentioned processing, for example, as shownin FIG. 4, the transmission state is deteriorated, the number ofrecorded frames becomes 0, and the restoration measure mode is started.After that, the transmission state recovers at a point of time t0 andthe number of recorded frames of the reception buffer 33 increases overtime.

Then, from the point of time t0 to a point of time t1 after thetransmission state recovers, the number of recorded frames graduallyincreases. After the number of recorded frames exceeds a discardthreshold Th, it is controlled to be the number of recorded frames shownby the solid-line circles by discarding a certain number of frames withrespect to the number of recorded frames actually transmitted, which areshown by the dotted line circles. In addition, as shown by thesolid-line circles at a point of time t2, after the actual number ofrecorded frames drops below the discard threshold Th, a determination oftermination of the restoration measure mode is started.

Note that FIG. 4 shows a change in the number of recorded frames overtime after the restoration measure mode is started and the transmissionstate recovers. In the figure, the horizontal axis indicates an elapsingtime and the vertical axis indicates the number of recorded frames.Further, the solid-line circles indicate the actual number of recordedframes controlled by discarding the encoded data in a manner thatdepends on needs in the restoration measure processing. The dotted-linecircles indicate the number of recorded frames in the case where theencoded data is not discarded.

That is, in the above-mentioned processing, the transmission state isdeteriorated and the restoration measure mode is started. After that,the transmission state is restored at the point of time t0. The numberof recorded frames gradually increases. The discard threshold Th isexceeded. The frame is discarded from the point of time t1 to the pointof time t2. Then, after the point of time t2, the actual number ofrecorded frames drops below the threshold Th. Thus, the discard isstopped. The determination of termination of the restoration measuremode is made at the subsequent timing.

However, as described above, when the restoration measure mode isprolonged, the encoded data is continuously discarded on aframe-by-frame basis. An operation time of the mute controller 38 isprolonged. A state in which normal audio output cannot be performedcontinues. Therefore, it is desirable to start the determination oftermination of the restoration measure mode, as early as possible, andto early terminate the restoration measure mode.

In view of this, if the number of recorded frames rapidly increases perunit time after the restoration measure mode is started, the encodeddata may be discarded on a frame-by-frame basis before the number ofrecorded frames reaches the discard threshold Th. In this manner, theperiod in which the encoded data is discarded on a frame-by-frame basismay be shortened. Thus, the determination of termination of therestoration measure mode may be started at an early timing and therestoration measure mode may be early terminated.

FIG. 5 shows a configuration example of the receiver/reproducer 12. Inthis configuration example, if the number of recorded frames per unittime rapidly increases after the restoration measure mode is started,the encoded data is discarded on a frame-by-frame basis before itreaches the discard threshold Th. Note that, in the receiver/reproducer12 of FIG. 5, configurations having functions identical to those of thereceiver/reproducer 12 of FIG. 1 will be denoted by identical names andidentical symbols and descriptions thereof will be appropriatelyomitted.

That is, in the receiver/reproducer 12 of FIG. 5, a different point fromthe receiver/reproducer 12 of FIG. 1 is a point that a discardmanagement unit 51 is provided instead of the discard management unit 34d of the reproduction controller 34.

Although the discard management unit 51 basically has a functionidentical to that of the discard management unit 34 d, a calculationmethod for the number of frames to be discarded is different.

Specifically, the discard management unit 51 calculates the number offrames to be deleted, on the basis of an increment in the number ofrecorded frames per unit time. Therefore, in the reception buffer 33, ifthe increment in the number of recorded frames per unit time is large,encoded data on a frame-by-frame basis that corresponds to the incrementis discarded even before the number of recorded frames exceeds thediscard threshold Th. Thus, the number of recorded frames becomes avalue smaller than the discard threshold Th at an early stage. Theperiod in which the frame is discarded can be shortened. Therefore, itbecomes possible to early terminate the restoration measure mode.

Thus, the determination of termination of the restoration measure modecan be early started and the restoration measure mode can be terminatedat an early timing. Generation of audio like noise due to discarding theencoded data on a frame-by-frame basis can be suppressed and the periodin which mute of the mute controller 38 is on can be shortened.

<Restoration Measure Processing of Receiver/Reproducer of FIG. 5>

Next, the restoration measure processing by the receiver/reproducer 12of FIG. 5 will be described with reference to the flowchart of FIG. 6.Note that the reproduction processing is similar to thereceiver/reproducer 12 of FIG. 1, and hence a description thereof willbe omitted. Further, the processing of Steps S71 and S73 to S86 in theflowchart of FIG. 6 is similar to the processing of Steps S41 and S43 toS56 in the flowchart of FIG. 3, and hence a description thereof will beomitted. That is, a difference of the flowchart of FIG. 6 from theflowchart of FIG. 3 is in the processing of Step S72.

That is, in Step S72, the discard management unit 51 calculates thenumber of frames to be deleted, on the basis of the increment in thenumber of recorded frames per unit time.

More specifically, for example, as shown in FIG. 7, the discardmanagement unit 51 determines an increment ΔFrame/ΔTime per unit time onthe basis of an amount of change ΔFrame in the number of recorded framesand a unit time ΔTime. The discard management unit 51 determines a ratioto an amount of change defined on the basis of a normal amount of changedefined during design. The discard management unit 51 multiplies thisratio by the amount of change ΔFrame to thereby determine the number offrames to be discarded.

For example, provided that the amount of change ΔFrame in the number ofrecorded frames is 8, the unit time ΔTime is 10, and the reference valueis 0.5, the discard management unit 51 calculates ΔFrame/ΔTime as 0.8and calculates (0.8-0.5)/0.5=0.6 as a ratio of the reference value tothe amount of change. In addition, the discard management unit 51multiplies the determined value by the amount of change ΔFrame (=8) inthe number of recorded frames and rounds it down to thereby determinethe number of discarded frames as 4.

In the above-mentioned processing, as shown in FIG. 7, the encoded datais discarded on a frame-by-frame basis correspondingly to the incrementbefore the number of recorded frames exceeds the discard threshold Th.Therefore, the frame to be discarded has been discarded before thediscard threshold Th is exceeded. Thus, a period in which the encodeddata excessively recorded in the reception buffer 33 is discarded on aframe-by-frame basis to be discarded can be made shorter than the periodof the points of time t1 to t2 shown in FIG. 4, as shown in the pointsof time t11 to t12 of FIG. 7.

Note that, in the receiver/reproducer 12 of FIG. 5, for the sake ofsimplification of the description, the ratio at a predetermined point oftime with respect to the elapsing time is used in calculation as it is.However, ratios at points of time may be determined and a mean of thedetermined ratios at the points of time may be used. In this case, theinfluence of variations in reaching time that depend on the transmissionenvironment can be further reduced.

Further, although the example in the communication utilizing Bluetooth(registered trademark) has been described above, the communicationprotocol is not limited thereto, and communication using othercommunication protocols may be employed. Further, although the exampleof transmitting the audio data through communication has been describedhereinabove, data other than the audio data may be transmitted as longas it is data stream-reproduced in real time. For example, video datamay be transmitted.

As described above, in accordance with the present technology, theapparatus on the reception side can determine a timing to startreproduction, on the basis of the number of frames that is a unit ofdecoding processing of encoded data recorded in the reception buffer.Thus, even if the compression rate of the encoded data is varied, stablereproduction can be performed without influencing the delay time.

Further, the quantity of encoded data stored in the reception buffer,which corresponds to the number of frames that should start to bereproduced, can be constantly kept. Therefore, even if the compressionrate of the encoded data is varied during reproduction, it becomespossible to reduce a necessary minimum memory size that should beensured, in comparison with the case of performing it on the basis ofthe number of bytes of the encoded data.

In addition, management is performed in units of decoding processing,for example, on the basis of the number of frames when the encoded datais discarded for keeping the delay constant after transmission isinterrupted and restored. Therefore, discarding processing can beperformed in units of decoding processing even if the compression rateof the encoded data is varied in a manner that depends on thetransmission condition on the transmission side, for example.

Further, in the case where a reproduction system in which encoded datatransmitted from a single transmitter is received and reproduced by aplurality of receiver/reproducers 12 is configured, even when packetsare transmitted and received at slot intervals as in Bluetooth, forexample, the reception side can synchronize and reproduce the packetswithout preparing an additional synchronization signal as long as only athreshold for determining on/off of the reproduction-permitted mode isconsistent.

<Execution Example by Software>

By the way, the above-mentioned series of processing may be executed byhardware or may be executed by software. In the case where the series ofprocessing is executed by software, a program configuring the softwareis installed from a recording medium into a computer incorporated indedicated hardware or, for example, a general-purpose personal computercapable of executing various functions by installing various programs.

FIG. 8 shows a configuration example of a general-purpose personalcomputer. The personal computer incorporates a CPU (Central ProcessingUnit) 1001. An input/output interface 1005 is connected to the CPU 1001via a bus 1004. A ROM (Read Only Memory) 1002 and a RAM (Random AccessMemory) 1003 are connected to the bus 1004.

To the input/output interface 1005, connected are a keyboard into whichthe user inputs operation commands, an input unit 1006 constituted of aninput device such as a mouse, an output unit 1007 that outputsprocessing operation screens and processing result images to a displaydevice, a storage unit 1008 constituted of a hard disk drive and thelike that store the program and various types of data, and acommunication unit 1009 that is constituted of an LAN (Local AreaNetwork) adapter and the like and executes communication processing viaa network represented by the Internet. Further, a drive 1010 isconnected thereto. The drive 1010 reads and writes data from/on aremovable medium 1011 such as a magnetic disk (including flexible disk),an optical disc (including CD-ROM (Compact Disc-Read Only Memory), a DVD(Digital Versatile Disc)), a magneto-optical disk (including MD (MiniDisc)), and a semiconductor memory.

The CPU 1001 executes various types of processing in accordance with theprogram stored in the ROM 1002 or the program read from the removablemedium 1011 such as a magnetic disk, an optical disc, a magneto-opticaldisk, and a semiconductor memory and installed into the storage unit1008, and loaded into the RAM 1003 from the storage unit 1008. Data andthe like necessary for the CPU 1001 to execute various types ofprocessing are also appropriately stored in the RAM 1003.

As described above, in the thus configured computer, the above-mentionedseries of processing is performed by, for example, the CPU 1001 loadingthe program stored in the storage unit 1008 into the RAM 1003 via theinput/output interface 1005 and the bus 1004 and executing it.

The program executed by the computer (CPU 1001) can be provided whilebeing recorded in the removable medium 1011 as a package medium, forexample. Further, the program can be provided via a wired or wirelesstransmission medium such as a local area network, the Internet, anddigital broadcasting.

In the computer, the program can be installed in the storage unit 1008via the input/output interface 1005 by mounting the removable medium1011 on the drive 1010. Further, the program can be received by thecommunication unit 1009 and installed in the storage unit 1008 via awired or wireless transmission medium. Otherwise, the program can beinstalled in advance in the ROM 1002 or the storage unit 1008.

Note that the program executed by the computer may be a program whoseprocesses are sequentially performed in the order described herein ormay be a program whose processes are performed concurrently or at anecessary timing, for example, upon calling.

Further, herein, the system means a collection of a plurality ofcomponents (apparatuses, modules (parts), etc.) and it does not matterwhether or not all the components are within an identical casing.Therefore, a plurality of apparatuses housed in separate casings andconnected via a network and a single apparatus including a plurality ofmodules housed within a single casing are both systems.

Note that embodiments of the present technology are not limited to theabove-mentioned embodiments and various variants can be made withoutdeparting from the gist of the present technology.

For example, the present technology can take a cloud computingconfiguration in which one function is shared and cooperativelyprocessed by a plurality of apparatuses via a network.

Further, the steps described above with reference to the flowcharts canbe shared and executed by a plurality of apparatuses rather than beingexecuted by a single apparatus.

In addition, in the case where a single step includes a plurality ofprocesses, the plurality of processes of the single step can be sharedand executed by a plurality of apparatuses rather than being executed bya single apparatus.

It should be noted that the present technology can also take thefollowing configurations.

(1) A signal processing apparatus, including:

a receiver that receives encoded data including data encoded inaccordance with a predetermined encoding method, which is transmitted;

a storage unit that stores the encoded data received by the receiver;

a decoder that decodes the encoded data stored in the storage unit, inaccordance with a method corresponding to the predetermined encodingmethod; and

a decoding management unit that controls decoding by the decoder to bepermitted on the basis of the number of units of decoding processing inthe encoded data, which are stored in the storage unit, in thepredetermined encoding method when decoded by the decoder.

(2) The signal processing apparatus according to (1), in which

the decoding management unit controls decoding by the decoder to bepermitted when the number of units of decoding processing in the encodeddata, which are stored in the storage unit, is larger than apredetermined threshold.

(3) The signal processing apparatus according to (1) or (2), furtherincluding

a switching unit that switches an output of the storage unit to thedecoder or others, and

the decoding management unit controls, when the number of units ofdecoding processing in the encoded data, which are stored in the storageunit, is larger than a predetermined threshold, the switching unit toconnect the output of the storage unit to the decoder to thereby controldecoding by the decoder to be permitted.

(4) The signal processing apparatus according to any one of (1) to (3),further including

a restoration measure unit that determines, on the basis of the numberof units of decoding processing in the encoded data, which are stored inthe storage unit, whether or not to turn on a restoration measure modeon which a restoration measure processing is performed, and performs therestoration measure processing, the restoration measure processing beinga measure for preventing a state in which all the encoded data cannot bedecoded by the decoder in the case where a transmission state of theencoded data is delayed due to deterioration of a transmissionenvironment and then the transmission environment is restored and theencoded data are collectively transmitted.

(5) The signal processing apparatus according to (4), in which

the restoration measure unit turns on the restoration measure mode whenthe number of units of decoding processing in the encoded data, whichare stored in the storage unit, is 0, the apparatus further including

a discard management unit that discards, in units of decodingprocessing, part of the encoded data stored in the storage unit when therestoration measure mode is on and the number of units of decodingprocessing in the encoded data, which are stored in the storage unit, islarger than a reference value based on the predetermined threshold.

(6) The signal processing apparatus according to (5), in which

the discard management unit discards, in units of decoding processing,encoded data stored in the storage unit, which exceeds the referencevalue based on the predetermined threshold in terms of the number ofunits of decoding processing.

(7) The signal processing apparatus according to (5), in which

the discard management unit discards, in units of decoding processing,the encoded data stored in the storage unit, which corresponds to aquantity set correspondingly to an increment in the number of units ofdecoding processing per unit time.

(8) The signal processing apparatus according to (5), further including:

a switching unit that switches an output of the storage unit to thedecoder or others; and

a discard unit that discards, in units of decoding processing, part ofthe encoded data stored in the storage unit, in which

the discard management unit controls, when discarding, in units ofdecoding processing, the part of the encoded data stored in the storageunit, the switching unit to connect the output of the storage unit tothe discard unit to thereby discard, in units of decoding processing,the part of the encoded data stored in the storage unit.

(9) The signal processing apparatus according to (4), in which

the restoration measure unit calculates a state variable atpredetermined time intervals on the basis of a mean and a variance ofthe number of units of decoding processing in the encoded data, whichare stored in the storage unit, in a predetermined period, and turns offthe restoration measure mode when a state in which a difference absolutevalue from a predetermined reference value is smaller than apredetermined threshold continues.

(10) The signal processing apparatus according to (4), further including

a sequence that stores a comparison result obtained by the restorationmeasure unit comparing a difference absolute value between the statevariable, which is calculated at the predetermined time intervals, and apredetermined reference value with a predetermined threshold, in which

the restoration measure unit turns off the restoration measure mode whena state in which the state variable calculated at the predetermined timeintervals on the basis of the comparison result stored in the sequence,the difference absolute value from the predetermined reference value issmaller than the predetermined threshold continues.

(11) The signal processing apparatus according to any one of (1) to (4),in which

the encoded data is obtained by encoding audio data to be output asaudio through a speaker, the apparatus further including

a mute controller that controls an output level of audio from thespeaker, which is based on the audio data decoded by the decoder, inwhich

when the restoration measure mode is on, the mute controller controlsthe output level of the audio from the speaker, which is based on theaudio data decoded by the decoder, to be lowered.

(12) A signal processing method, including the steps of:

receiving encoded data including data encoded in accordance with apredetermined encoding method, which is transmitted;

storing the received encoded data;

decoding the stored encoded data in accordance with a methodcorresponding to the predetermined encoding method; and

controlling decoding to be permitted on the basis of the number of unitsof decoding processing in the stored encoded data in the predeterminedencoding method when decoded.

(13) A program that causes a computer to function as:

a receiver that receives encoded data including data encoded inaccordance with a predetermined encoding method, which is transmitted;

a storage unit that stores the encoded data received by the receiver;

a decoder that decodes the encoded data stored in the storage unit, inaccordance with a method corresponding to the predetermined encodingmethod; and

a decoding management unit that controls decoding by the decoder to bepermitted on the basis of the number of units of decoding processing inthe encoded data, which are stored in the storage unit, in thepredetermined encoding method when decoded by the decoder.

REFERENCE SIGNS LIST

11 Bluetooth module, 12 receiver/reproducer, 13 speaker, 21 transmitter,31 reception processor, 32 codec unit, 32 a number-of-frames calculator,33 reception buffer, 34 reproduction controller, 34 a reproductionmanagement unit, 34 b restoration measure unit, 34 c determinationsequence, 34 d discard management unit, 35 switch, 35 a, 35 b terminal,36 decoder, 37 data discarding unit, 38 mute controller, 51 discardmanagement unit

1. A signal processing apparatus, comprising: a receiver that receivesencoded data comprising data encoded in accordance with a predeterminedencoding method, which is transmitted; a buffer that stores the encodeddata received by the receiver; a decoder that decodes the encoded datastored in the buffer in accordance with a method corresponding to thepredetermined encoding method; and a controller that controls decodingby the decoder when the number of units of decoding processing in theencoded data, which are stored in the buffer, is larger than apredetermined threshold, in the predetermined encoding method whendecoded by the decoder.
 2. The signal processing apparatus according toclaim 1, further comprising a switching unit that switches an output ofthe buffer to the decoder or others.
 3. The signal processing apparatusaccording to claim 1, further comprising a restoration measure unit thatdetermines, on the basis of the number of units of decoding processingin the encoded data, which are stored in the buffer, whether or not toturn on a restoration measure mode on which a restoration measureprocessing is performed, and performs the restoration measureprocessing, the restoration measure processing being a measure forpreventing a state in which all the encoded data cannot be decoded bythe decoder in the case where a transmission state of the encoded datais delayed due to deterioration of a transmission environment and thenthe transmission environment is restored and the encoded data arecollectively transmitted.
 4. The signal processing apparatus accordingto claim 3, wherein the restoration measure unit turns on therestoration measure mode when the number of units of decoding processingin the encoded data, which are stored in the storage unit, is 0, theapparatus further comprising a discard management unit that discards, inunits of decoding processing, part of the encoded data stored in thebuffer when the restoration measure mode is on and the number of unitsof decoding processing in the encoded data, which are stored in thestorage unit, is larger than a reference value based on thepredetermined threshold.
 5. The signal processing apparatus according toclaim 4, wherein the discard management unit discards, in units ofdecoding processing in the encoded data stored in the buffer, whichexceeds the reference value based on the predetermined threshold interms of the number of units of decoding processing.
 6. The signalprocessing apparatus according to claim 4, wherein the discardmanagement unit discards, in units of decoding processing in the encodeddata stored in the buffer, which corresponds to a quantity setcorrespondingly to an increment in the number of units of decodingprocessing per unit time.
 7. The signal processing apparatus accordingto claim 4, further comprising: a discard unit that discards, in unitsof decoding processing, part of the encoded data stored in the buffer,wherein the discard management unit controls, when discarding, in unitsof decoding processing, the part of the encoded data stored in thebuffer, the controller to connect the output of the buffer to thediscard unit to thereby discard, in units of decoding processing, thepart of the encoded data stored in the buffer.
 8. The signal processingapparatus according to claim 3, wherein the restoration measure unitcalculates a state variable at predetermined time intervals on the basisof a mean and a variance of the number of encoded data in units ofdecoding processing, which are stored in the buffer, in a predeterminedperiod, and turns off the restoration measure mode when a state in whicha difference absolute value from a predetermined reference value issmaller than a predetermined threshold continues.
 9. The signalprocessing apparatus according to claim 3, further comprising a sequencethat stores a comparison result obtained by the restoration measure unitcomparing a difference absolute value between the state variable, whichis calculated at the predetermined time intervals, and a predeterminedreference value with a predetermined threshold, wherein the restorationmeasure unit turns off the restoration measure mode when a state inwhich the state variable calculated at the predetermined time intervalson the basis of the comparison result stored in the sequence, thedifference absolute value from the predetermined reference value issmaller than the predetermined threshold continues.
 10. The signalprocessing apparatus according to claim 3, wherein the encoded data isobtained by encoding audio data to be output as audio through a speaker,the apparatus further comprising a mute controller that controls anoutput level of audio from the speaker, which is based on the audio datadecoded by the decoder, wherein when the restoration measure mode is on,the mute controller controls the output level of the audio from thespeaker, which is based on the audio data decoded by the decoder, to belowered.
 11. A signal processing method, comprising: receiving, by areceiver, encoded data comprising data encoded in accordance with apredetermined encoding method, which is transmitted; storing, by abuffer, the received encoded data; decoding, by a decoder, the storedencoded data in accordance with a method corresponding to thepredetermined encoding method; and controlling, by a controller,decoding when a number of units of decoding processing in the storedencoded data is larger than a predetermined threshold, in thepredetermined encoding method when decoded.
 12. A non-transitorycomputer-readable medium storing instructions that, when executed by acomputer, cause the computer to function as: a receiver that receivesencoded data comprising data encoded in accordance with a predeterminedencoding method, which is transmitted; a buffer that stores the encodeddata received by the receiver; a decoder that decodes the encoded datastored in the buffer, in accordance with a method corresponding to thepredetermined encoding method; and a controller, that controls decodingby the decoder when the number of units of decoding processing in theencoded data, which are stored in the buffer, is larger than apredetermined threshold, in the predetermined encoding method whendecoded by the decoder.